extends ../layout

block content
  .container
    .row
      h1= title
        small 图书列表
      each item in books
        .col-md-3.col-xm-6.col-xs-6
          .thumbnail.text-center
            a(href='/detail/#{item._id}')
              img(src='#{item.poster}' ,alt='#{item.title}')
            .caption
              h3= item.title
              .btn-group
                a.btn.btn-primary(href='/detail/#{item._id}') 查看详情
                a.btn.btn-primary(href='#{item.buyUrl}') 购买书籍
